<template>
  <div id="app">
    <h2>来自子组件的值 {{ NumFromChild }}</h2>
    <Left :msg="message" @getNum="getNum"></Left>
    <Right></Right>
  </div>
</template>

<script>
import Left from './components/Left.vue'
import Right from './components/Right.vue'
export default {
  name: 'App',
  components: {
    Left,
    Right
  },
  data () {
    return {
      message: 'hello world',
      NumFromChild: 1
    }
  },
  methods: {
    getNum (num) {
      this.NumFromChild = num
    }
  }
}
</script>

<style lang="scss">

</style>
